package com.io.client;

import com.io.dto.ProductReq;
import com.io.dto.ProductRes;
import com.io.fallback.ProductClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * The class/interface
 *
 * @author guodd
 * @version 1.0 use jdk 1.8
 * FeignClient中，path = "/lily-base-product"可以根据实际情况指定，一般都加
 */
@Component
@FeignClient(value = "lily-base-product", fallback = ProductClientFallBack.class)
public interface ProductClient {
    @PostMapping(value = "/product/info")
    ProductRes getInfo(@RequestBody ProductReq productReqDTO);
}
